package com.example.android.doubleclick;

import com.google.ads.DoubleClickSpec;
import com.google.ads.DoubleClickSpec.SizeProfile;
import com.google.ads.GoogleAdView;

import android.app.Activity;
import android.os.Bundle;

public class DoubleClickExample extends Activity {

    // Replace with your own DoubleClick keyname.
    private static final String KEYNAME = "sdktest/testing;kw=test";

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        // Set up GoogleAdView.
        GoogleAdView adView = (GoogleAdView) findViewById(R.id.adview);
        DoubleClickSpec doubleClickSpec =
            new DoubleClickSpec(KEYNAME)      // Specify keyname. (Required)
            .setSizeProfile(SizeProfile.XL);  // Set size profile to XL.

        // Fetch DoubleClick ad.
        adView.showAds(doubleClickSpec);
    }
}
